<link rel="stylesheet" type="text/css" href="/static/manage/css/member/miniapp/style.css?v=18"/>
<style>
    .layuimini-container {
        background-color: #f2f2f2;
    }

    .app-item {
        cursor: pointer;
    }

    .have_buy {
        font-size: 14px;

    }
    .tr-l-btn{
        cursor: pointer;
    }
    .tr-r-btn{
        cursor: pointer;
    }

    .list-r-text{
        min-height: 44px;
    }
</style>
<div class="layuimini-container">
    <!--<div class="layuimini-main">-->
    <div class="box">
        <div class="top-box">
            <div class="tops-box">
                <div class="top-box-left">
                    <div class="blue-box"></div>
                    <div class="top-title">应用商店</div>
                    <div class="top-img">
                        <img src="/static/manage/images/member/miniapp/icon.png">
                    </div>
                </div>
                <div class="gray">
                    <div class="gray-box">
                        应用商店的使用方法与操作显示区域
                    </div>
                </div>
            </div>
            <div class="layui-row layui-col-space10"  id="shop_app_list">
                <!-- <div class="layui-col-md4">
                  <div class="grid-demo grid-demo-bg1">33.33%</div>
                </div>
                <div class="layui-col-md4">
                  <div class="grid-demo">33.33%</div>
                </div>
                <div class="layui-col-md4">
                  <div class="grid-demo grid-demo-bg1">33.33%</div>
                </div> -->
            </div>
        </div>
        <div class="centent-boxs">
            <div class="center-box">
                <div class="center-box-left">
                    <div class="blue-box"></div>
                    <div class="center-title">已购应用</div>
                </div>
                <div class="table-box">
                    <table class="table">
                        <tr class="table-tr">
                            <td style="width: 10%;">应用ID</td>
                            <td style="width: 10%;">应用名称</td>
                            <td style="width: 20%;">客户端ID</td>
                            <td style="width: 20%;">购买时间</td>
                            <td style="width: 20%;">过期时间</td>
                            <td style="width: 10%;">剩余天数</td>
                            <td style="width: 20%;">操作</td>
                        </tr>
                    </table>
                </div>
            </div>
        </div>

    </div>
    <!--</div>-->
</div>

<script id="app_shop_template" type="text/html">
    {{#  layui.each(d, function(index, item){ }}
    <div class="list layui-col-lg4 layui-col-md6 layui-col-sm12" >
        <div class="list-box app-item"  data-id="{{item.id}}">
            {{# if(item.label == 'recommend' ){ }}
            <img src="/static/manage/images/member/miniapp/orange.png" class="list-t-img">
            <div class="list-t-text">
                推荐
            </div>
            {{# } }}
            {{# if(item.label == 'hot' ){ }}
            <img src="/static/manage/images/member/miniapp/red.png" class="list-t-img">
            <div class="list-t-text">
                热门
            </div>
            {{# } }}




            <div class="list-content">
                <div class="list-left">
                    <img src="{{item.logo_image}}">
                </div>
                <div class="list-right">
                    <div class="list-right-box">
                        <div class="list-r-h">
                            {{item.title}}
                            {{# if(item.buy){ }}
                            <div class="c-r">已购</div>
                            {{# } }}
                        </div>
                        <div class="list-r-lable">
                            {{# if(item.types.search('mini_program') !=-1){ }}
                            <div class="list-lable-span">
                                微信小程序
                            </div>
                            {{# } }}
                            {{# if(item.types.search('app' ) !=-1){ }}
                            <div class="list-lable-span">
                                APP
                            </div>
                            {{# } }}
                            {{# if(item.types.search('h5') !=-1 ){ }}
                            <div class="list-lable-span">
                                h5
                            </div>
                            {{# } }}
                            {{# if(item.types.search('official') !=-1 ){ }}
                            <div class="list-lable-span">
                                微信公众号
                            </div>
                            {{# } }}
                            {{# if(item.types.search('system') !=-1 ){ }}
                            <div class="list-lable-span">
                                系统
                            </div>
                            {{# } }}
                            {{# if(item.types.search('tt_program') !=-1 ){ }}
                            <div class="list-lable-span">
                                头条小程序
                            </div>
                            {{# } }}
                        </div>
                    </div>
                    <div class="list-r-text">
                        应用简介：{{item.describe}}
                    </div>
                    <div class="btn-box">
                        <div class="list-money">
                            <p>
                                <span>¥</span><span>{{item.min_price}}</span>~<span>{{item.max_price}}</span>
                            </p>
                        </div>
                        <div class="list-btn">
                        {{# if(item.buy){ }}
                        <div class="list-l-btn " data-event="open" data-dir="{{item.dir}}">进入应用</div>
                        <div class="list-r-btn"   data-id="{{item.id}}" data-title="应用续费" data-event="renew">立即续费</div>
                        {{# } else { }}
                        <div class="list-r-btn ">立即购买</div>
                        {{# } }}
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>


    {{#  }); }}
    {{#  if(d.length === 0){ }}
    <div class="layui-col-md12">
        <div><i class="layui-icon layui-icon-close-fill"></i><span class="null-sty">&nbsp&nbsp 平台暂未上架任何可购买应用。如果您是总平台管理员，请到总平台管理后台安装应用并上架。...</span></div>
    </div>
    {{#  } }}
</script>
<script id="app_buy_template" type="text/html">
    {{#  layui.each(d, function(index, item){ }}

    <tr class="tr">
        <td style="width: 10%;">{{item.id}}</td>
        <td style="width: 10%;">{{item.appname}}</td>
        <td style="width: 20%;">{{item.service_id}}</td>
        <td style="width: 20%;">{{item.create_time}}</td>
        <td style="width: 20%;">{{item.expire_time}}</td>
        <td style="width: 10%;">{{item.ex_days}}</td>
        <td style="width: 20%;">
            <div class="td-btn">
                <div class="tr-l-btn" data-event="open" data-dir="{{item.miniapp.dir}}">进入应用</div>
                <div class="tr-r-btn" data-id="{{item.miniapp.id}}" data-title="应用续费" data-event="renew">续费</div>
            </div>
        </td>
    </tr>


    {{#  }); }}
    {{#  if(d.length === 0){ }}
    <tr class="tr">
        <td style="width: 100%;">尚未购买任何应用</td>
    </tr>
    {{#  } }}


</script>
<script>
    var app_id = 0;
</script>

